From: Florian Müllner Date: Mon, 28 Jun 2021 16:31:13 +0000 (+0200) Subject: status/power: Always sync after creating proxy X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~574^2^2~244 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8430aa59da4cd884047ee827da1702a807ff1572;p=gnome-shell.git status/power: Always sync after creating proxy Otherwise the menu remains in an inconsistent state in case of an error, until something else triggers a call to _sync() (like a settings change). https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4431 Part-of: --- diff --git a/js/ui/status/power.js b/js/ui/status/power.js index a43eeb65e..c79ff798e 100644 --- a/js/ui/status/power.js +++ b/js/ui/status/power.js @@ -40,10 +40,10 @@ class Indicator extends PanelMenu.SystemIndicator { (proxy, error) => { if (error) { log(error.message); - return; + } else { + this._proxy.connect('g-properties-changed', + this._sync.bind(this)); } - this._proxy.connect('g-properties-changed', - this._sync.bind(this)); this._sync(); });